package com.qingcloud.adminbackend.service;

import com.qingcloud.adminbackend.base.AjaxResult;
import com.qingcloud.adminbackend.entity.aline.TcpValueCommandDTO;
import com.qingcloud.adminbackend.entity.upgrade.UpgradeSpecialDTO;
import com.qingcloud.adminbackend.entity.upgrade.UpgradeSpecialRequest;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ITdUpgradeSpecialService {

    /**
     * 分页查询
     *
     * @param upgradeSpecialRequest
     * @return
     */
    AjaxResult getUpgradeSpecial(UpgradeSpecialRequest upgradeSpecialRequest);

    /**
     * 添加
     *
     * @param upgradeSpecial
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    List<TcpValueCommandDTO> addUpgradeSpecial(UpgradeSpecialDTO upgradeSpecial);

    /**
     * 通过ID查找
     *
     * @param id
     * @return
     */
    AjaxResult getUpgradeSpecialById(String id);

    /**
     * 更新
     *
     * @param upgradeSpecial
     * @return
     */
    AjaxResult updateUpgradeSpecial(UpgradeSpecialDTO upgradeSpecial);

    /**
     * 删除
     *
     * @param ids
     * @return
     */
    AjaxResult deleteUpgradeSpecial(String[] ids);

    AjaxResult batchImport(MultipartFile excelFile, String userName, String binId) throws Exception;

    /**
     * 监测输入站点是否存在
     *
     * @param equipmentId
     * @return
     */
    AjaxResult existEquipmentId(String equipmentId);

    /**
     * 发送升级指令到物联网后台接口
     *
     * @param tcpValueCommandDTOS
     * @return
     */
    AjaxResult sendUpgradeCommand(List<TcpValueCommandDTO> tcpValueCommandDTOS);

    /**
     * 老版升级指令
     */
    Boolean oldUpgradeCommand(String equipmentId);

}
